package behavioral_pattern.command_pattern.concrete_command;

import behavioral_pattern.command_pattern.comand.Command;
import behavioral_pattern.command_pattern.receiver.Tv;

public class ChangeChannelCommand implements Command {
    private Tv tv;
    private int channel;

    public ChangeChannelCommand(Tv tv, int channel) {
        this.tv = tv;
        this.channel = channel;
    }

    @Override
    public void execute() {
        tv.changeChannel(this.channel);
    }
}
